<template>
  <div>
    <swiper>
      <swiper-item v-for="item in banner">
        <a :herf="item.link">
          <img :src="item.image" @load="imgLoad">
        </a>
      </swiper-item>
    </swiper>
  </div>
</template>

<script>
  import {Swiper,SwiperItem} from 'components/common/swiper/index.js'
  export default {
    name: "home-swiper",
    props: {
      banner:{
        type: Array,
        default(){
          return []
        }
      }
    },
    components:{
      Swiper,
      SwiperItem
    },
    methods:{
      imgLoad(){
        this.$emit('swiperLoaded')
      }
    }
  }
</script>

<style scoped>

</style>
